package org.bigjava.buff.user.service;

import org.apache.ibatis.annotations.Param;
import org.bigjava.buff.common.util.Page;
import org.bigjava.buff.goods.bean.ExteriorAndPrice;
import org.bigjava.buff.user.bean.User;

import java.util.List;

public interface UserService {

    //用户登陆
    public User login(User user);

    //用户注册
    public boolean register(User user);

    //修改用户信息
    public void updateUser(User user);

    //更改余额  用户id 以及更改的金额    更改的类型 加或者减
    public boolean updateBalance(Integer userId,Double money,Integer updatetType);

    //通过id来查找用户
    public User getUserbyId(Integer id);

    //获取用户库存
    public Page getUserInventory(Integer id, Page page);

    //通过多个id查找多个商品信息
    public List<ExteriorAndPrice> findGoodsByIds(@Param("gid") List<Integer> gid, @Param("uid") Integer uid);

    //收藏物品
    public int collectGoods(Integer goodsId,Integer uId);


}
